import { get, post, formData,downloposts } from "@/api/services/formReq";

// DPIA统计数据
export const dpiaStatistical = params => post("/v1/dpia/statisticalData", params);

// my DPIA列表
export const dpiaLists = params => post("/v1/dpia/list", params);
// all DPIA列表
export const dpiaAllLists = params => post("/v1/dpia/all/list", params);
//DPIA历史
export const dpiahistoryLists = params => post("/v1/dpia/history/list", params);

// DPIA删除
export const dpiaDelete = params => post("/v1/dpia/delete", params);

// DPIA筛选项
export const dpiaGroup = params => post("/v1/dpia/group", params);

// all DPIA筛选项
export const allDpiaGroup = params => post("/v1/dpia/all/group", params);

// DPIA模版列表
export const dpiaModelLists = params => post("/v1/dpia/model/lists", params);

// DPIA模版的新建
export const dpiaModelCreate = params => post("/v1/dpia/model/create", params);

// DPIA模版删除
export const dpiaModeldelete = params => post("/v1/dpia/model/delete", params);

// DPIA模版修改
export const dpiaModelChange = params => post("/v1/dpia/model/change", params);

// DPIA模版读取
export const dpiaModelRead = params => post("/v1/dpia/model/read", params);

// DPIA的章节新增
export const dpiaChapterCreate = params => post("/v1/dpia/model/chapter/create", params);

// DPIA题库列表
export const dpiaQuestionLists = params => post("/v1/dpia/question/lists", params);

// DPIA题库删除
export const dpiaQuestionDelete = params => post("/v1/dpia/question/delete", params);

// DPIA题库的读取
export const dpiaQuestionRead = params => post("/v1/dpia/question/read", params);

// DPIA的Action列表
export const dpiaActionModelLists = params => post("/v1/dpia/action/model/list", params);

// DPIA的Action修改
export const dpiaActionModelChange = params => post("/v1/dpia/action/model/update", params);

// DPIA的Action新增
export const dpiaActionModelCreate = params => post("/v1/dpia/action/model/create", params);

// DPIA的Action详情
export const dpiaActionModelDetail = params => post("/v1/dpia/action/models/detail", params);

// DPIA的Action删除
export const dpiaActionModelDelete = params => post("/v1/dpia/action/model/delete", params);
//DPIA备注列表
export const dpiaActionBeizhuList = params => post("/v1/dpia/action/info/list", params);
//  备注修改
export const dpiaActionBeizhuUpdate = params => post("/v1/dpia/action/info/update", params);
//备注删除
export const dpiaActionBeizhuDelete = params => post("/v1/dpia/action/info/delete", params);
// 创建DPIA问卷
export const dpiaQuestionsCreate = params => post("/v1/dpia/questionnaire/create", params);

// 创建DPIA问卷 Portal
export const dpiaQuestionsCreatePortal = params => post("/v1/dpia/questionnaire/tmp/create", params);
// DPIA问卷的章节获取
export const dpiaQuestionsChapterLists = params => post("", params);

// DPIA模版章节列表
export const dpiaModelChapterLists = params => post("/v1/dpia/model/chapter/lists", params);

// DPIA聚合下拉
export const dpiaDropDownLists = params => post("/v1/dpia/dropDownLists", params);

// DPIA模版根据题目获取答案接口
export const dpiaQuestionAnswer = params => post("/v1/dpia/model/chapter/topic/answer", params);

//DPIA模版-章节题目列表
export const dpiaModelChapterTopicLists = params => post("/v1/dpia/model/chapter/topic/lists", params);

//DPIA模版-章节删除
export const dpiaModelChapterDelete = params => post("/v1/dpia/model/chapter/delete", params);

//DPIA模版-章节修改
export const dpiaModelChapterChange = params => post("/v1/dpia/model/chapter/save", params);

//DPIA模版-章节题目删除
export const dpiaModelChapterTopicDelete = params => post("/v1/dpia/model/chapter/topic/delete", params);

// DPIA的答题章节列表 
export const dpiaQuestionChapterLists = params => post("/v1/simpleChapter", params);
// DPIA的答题章节全部列表
export const dpiaQuestionChapterAllLists = params => post("/v1/simpleChapterAll", params);
// DPIA的答题信息查询
export const dpiaQuestionInfo = params => post("/v1/simpleInfo", params);

// DPIA的答题查当前该答的题目
export const dpiaQuestionTopic = params => post("/v1/dpia/questionnaire/question/select", params);

// DPIA的答题提交内容
export const dpiaQuestionAnswerCreate = params => post("/v1/dpia/question/answer", params);

// DPIA的问卷状态修改
export const dpiaQuestionChangeStatus = params => post("/v1/dpia/questionnaire/changeStatus", params);

// DPIA根据问卷ID、章节ID查答题结果
export const dpiaSimpleAnswer = params => post("/v1/simpleAnswer", params);

// DPIA根据问卷ID获取Action（初步）
export const dpiaSimpleAction = params => post("/v1/simpleAction", params);
// all dpia action
export const allDpiaSimpleAction = params => post("/v1/all/simpleAction", params);

// 获取DPIA单个DCO评估的结论
export const dpiaDcoRemarkInfo = params => post("/v1/dpia/getItemsDcoRemark", params);

// 写入DPIA单个DCO评估的结论
export const dpiaDcoRemarkInfoUpdate = params => post("/v1/dpia/setItemsDcoRemark", params);

// DCO转办
export const dpiaDcoTransfer = params => post("/v1/dpia/transfer", params);

// DCO退回
export const dpiaDcoBackoff = params => post("/v1/dpia/transferBack", params);

// DPIA的Action备注列表
export const dpiaRemarkLists = params => post("/v1/risk/action/info/List", params);

// 根据DPIA的ID查Risk的列表
export const dpiaRiskLists = params => post("/v1/simpleRisk", params);
// all dpia risk
export const allDpiaRiskLists = params => post("/v1/all/simpleRisk", params);

// 根据DPIA的ID获取评估意见
export const getItemsChapterRemark = params => post("/v1/dpia/getItemsChapterRemark", params);

// 获取/v1/dpia/getAllDcoRemark，id
// /v1/dpia/getItemsDcoRemark DpiaQid DpiaChapterId
// /v1/dpia/setItemsDcoRemark DpiaQid DpiaChapterId
//dco 交换意见
export const dpiaChange = params => post("/v1/dpia/setItemsDcoRemark", params);

//DPIA 切换问卷状态
export const dpiaChangeState = params => post("/v1/dpia/setQuestionnaireStatus", params);

// 提交交换意见
export const dpiaCompleteAssessmentPush = params => post("/v1/dpia/setExchangeStatus", params);

// 判断是否完成评估
export const dpiaCompleteAssessment = params => post("/v1/dpia/getExchangeStatus", params);
// action模版
export const templateSelection = params => post("/v1/dpia/action/query", params);
// 模版查询
export const templateSelectionInfo = params => post("/v1/risk/action/createActionByActionId", params);
//转办详情
export const transferDetails = params => post("/v1/dpia/getItemsTransferRemark", params);
//非dco查看权限人员列表 
export const permissionsList = params => post("/v1/dpia/getPermissionList", params);
//多人答题列表
export const writesList = params => post("/v1/dpia/getWriteUserList", params);
//新增非dco查看权限 
export const addpermissions = params => post("/v1/dpia/getPermission", params);
//新增多人编辑
export const addWrites = params => post("/v1/dpia/addWriteUser", params);
// 删除非dco查看权限
export const delpermissions = params => post("/v1/dpia/deletePermission", params);
// 删除多人答题权限
export const delWrites = params => post("/v1/dpia/deleteWriteUser", params);

//报告下载
export const DpiaDownload = params => post("/v1/dpia/report/download", params);
//报告生成和上传
export const DpiaUpload = params => post("/v1/dpia/report/upload", params);
//报告列表
export const DpiaList = params => post("/v1/dpia/report/list", params);
// 
export const getItemsRemark = params => post("/v1/dpia/getItemsRemark", params);

//撤回
export const dpiaWithdraw = params => post("/v1/dpia/setQuestionnaireStatusBack", params);
//判断是否可撤回
export const isWithdraw = params => post("/v1/dpia/dco/check", params);
//ACTION删除
export const rickActiondel = params => post("/v1/risk/action/deleteAction", params);

// 获取答题日志列表 
export const getAnswerLogList = params => post("/v1/dpia/question/answerrecord/list", params);
// 创建答题日志
export const createAnswerLogList = params => post("/v1/dpia/question/answerrecord/create", params);
//下一章的settime
export const createSettime = params => post("/v1/dpia/dco/setTime", params);
//交换意见 
export const exchangeList = params => post("/v1/dpia/exchange", params);
//查看交换意见
export const exchangeSee = params => post("/v1/dpia/getExchange", params);
//撤销交互意见
export const exchangecancel = params => post("/v1/dpia/exchange/cancel", params);

//上传文件删除
export const FilesDel = params => post("/v1/risk/action/info/Delete", params);
//整体评估获取下次评估时间 
export const getNextTime = params => post("/v1/dpia/dco/getTime", params);

// dpia   ID
export const dpiaId = params => get("/v1/dpia/id", params);

//仪表盘dashboard
export const statisticalData = params => post("/v1/dashboard/statisticalData", params);
//仪表盘dashboardList
export const statisticalDatalist = params => post("/v1/dpia/list", params);

//每日运营
export const optrecord = params => post("/v1/optrecord/list", params);
//每日运营查询
export const Opselect = params => post("/v1/optrecord/select", params);
//每日运营下拉
export const Opgroup = params => post("/v1/optrecord/group", params);

//用户首页 子类
export const PortalallAction = params => post("/v1/dpia/allAction", params);

export const Porstatisticsum = params => post("/v1/risk/statisticsum", params);


// 下载export
export const downexport = params => downloposts("/v1/dpia/dashboard/export", params);
